<%-- 
    Document   : QuanLyKhachHang
    Created on : Dec 23, 2014, 12:05:48 PM
    Author     : thien_000
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

    <!-- Mirrored from www.webgurus.biz/adminskin2/dashboard.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 16 Jan 2010 14:46:00 GMT -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Quản lý khách hàng | Admin</title>
        <link rel="stylesheet" type="text/css" href="css/960.css" />
        <link rel="stylesheet" type="text/css" href="css/reset.css" />
        <link rel="stylesheet" type="text/css" href="css/text.css" />
        <link rel="stylesheet" type="text/css" href="css/blue.css" />
        <link type="text/css" href="css/smoothness/ui.css" rel="stylesheet" />  
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/blend/jquery.blend.js"></script>
        <script type="text/javascript" src="js/ui.core.js"></script>
        <script type="text/javascript" src="js/ui.sortable.js"></script>    
        <script type="text/javascript" src="js/ui.dialog.js"></script>
        <script type="text/javascript" src="js/ui.datepicker.js"></script>
        <script type="text/javascript" src="js/effects.js"></script>
        <script type="text/javascript" src="js/flot/jquery.flot.pack.js"></script>
        <script language="javascript" type="text/javascript" src="js/graphs.js"></script>
        <link href="css/bootstrap.min.css" rel="stylesheet"/>
        <script src="bootstrap/js/jquery.min.js" type="text/javascript"></script>
        <script src="js/bootstrap.min.js" type="text/javascript"></script>
        <link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet"/>
        <script src="js/ajax/Searchlive.js" type="text/javascript"></script>
    </head>
    <body>
        <!-- WRAPPER START -->
        <div class="container_16" id="wrapper">	
            <!--LOGO-->
            <div class="grid_8" id="logo"> Admin - Trang quản trị</div>
            <div class="grid_8">
                <!-- USER TOOLS START -->
               <div id="user_tools"><span><a href="#" class="mail"></a> Welcome <a href="#">${sessionScope.username}</a> | <a href="controller_logout">Logout</a></span></div>
            </div>
            <!-- USER TOOLS END -->    
            <div class="grid_16" id="header">
                <!-- MENU START -->
                <div id="menu">
                    <ul class="group" id="menu_group_main">
                        <li class="item first" id="one"><a href="TrangQuanTri.jsp" ><span class="outer"><span class="inner dashboard">Trang Quản Trị</span></span></a></li>
                        <li class="item middle" id="two"><a href="controller_nhanvien?btAction=qlnv"><span class="outer"><span class="inner employer">QL Nhân viên</span></span></a></li>
                        <li class="item middle" id="three"><a href="controller_khachhang?btAction=qlkh"><span class="outer"><span class="inner custormers">QL Khách hàng</span></span></a></li>
                        <li class="item middle" id="four"><a href="controller_chuyenbay?btAction=qlcb"><span class="outer"><span class="inner airplane">QL Chuyến bay</span></span></a></li>
                        <li class="item middle" id="five"><a href="controller_ve?btAction=qlv"><span class="outer"><span class="inner tickets">QL Vé</span></span></a></li>        
                        <li class="item middle" id="six"><a href="#"><span class="outer"><span class="inner event_manager">QL Tin tức</span></span></a></li>        
                        <li class="item middle" id="seven"><a href="#"><span class="outer"><span class="inner contact">Liên hệ</span></span></a></li>        
                        <li class="item last" id="eight"><a href="#"><span class="outer"><span class="inner home">Trang chủ</span></span></a></li>  
                    </ul>
                </div>
                <!-- MENU END -->
            </div>
            <div >
                <!-- CONTENT START -->
                <div class="grid_16" id="content">
                    <!--  TITLE START  --> 
                    <div class="grid_9">
                        <h1 class="custormers">Quản lý khách hàng</h1>
                    </div>
                    <div class="clear" >
                    </div>
                    <div id="frmSearch">
                        <form action="controller_khachhang" method="post">
                            <h2><b>Tìm theo tên:</b></h2>
                            <p><b>Bạn muốn tìm: </b><span id="txtHintTenKH"></span></p>
                            <p><input type="text" name="txtSearch" onkeyup="showHintTenKH(this.value)"/></p>
                            <input class="btn btn-primary" type="submit" name="btAction" value="Search" />
                        </form>
                    </div>

                    <center>
                        <table>
                            <tr><td>
                                    <div id="tableqlkh">
                                        <c:set var="info" value="${requestScope.INFOKH}"/>
                                        <c:if test="${not empty info}">
                                            <center>
                                                <table class="table table-bordered">
                                                    <thead>
                                                        <tr>
                                                            <th>STT</th>
                                                            <th style="text-align: center">Mã khách hàng</th>
                                                            <th style="text-align: center">Tài khoản</th>
                                                            <th style="text-align: center">Mật khẩu</th>
                                                            <th style="text-align: center">Họ tên</th>
                                                            <th style="text-align: center">Giới tính</th>
                                                            <th style="text-align: center">Email</th>
                                                            <th style="text-align: center">Số điện thoại</th>
                                                            <th colspan="2" style="text-align: center">Thao tác</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <c:set var="count" value="0"/>
                                                        <c:forEach var="rows" items="${info}">
                                                            <form action="controller_khachhang" method="post">
                                                                <c:set var="count" value="${count+1}"/>
                                                                <tr>
                                                                    <td>${count}.</td>
                                                                    <td>${rows.maKH}<input type="hidden" value="${rows.maKH}" name="makh"/></td>
                                                                    <td>${rows.taiKhoan}<input type="hidden" name="taikhoankh" value="${rows.taiKhoan}"/></td>
                                                                    <td><input type="text" name="matkhaukh" value="${rows.matKhau}" size="8"/> </td>
                                                                    <td><input type="text" name="hotenkh" value="${rows.hoTen}" size="18"/></td>
                                                                    <td><input type="text" name="gioitinhkh" value="${rows.gioiTinh}" size="1"/></td>
                                                                    <td><input type="text" name="emailkh" value="${rows.email}" size="10"/></td>
                                                                    <td><input type="text" name="sodtkh" value="${rows.soDT}" size="10"/></td>
                                                                    <c:url var="delete" value="controller_khachhang">
                                                                        <c:param name="btAction" value="Delete"/>
                                                                        <c:param name="deleteTaiKhoan" value="${rows.taiKhoan}"/>
                                                                    </c:url>
                                                                    <td><a href="${delete}">Delete</a></td>
                                                                    <td><input class="btn btn-info" type="submit" name="btAction" value="Update"/></td>
                                                                </tr>
                                                            </form>
                                                        </c:forEach>
                                                    </tbody>
                                                </table>
                                            </center>
                                        </c:if>
                                        <c:if test="${empty info}">
                                            <strong><b><h1><span class="alert-info">Không có dữ liệu !!!</span></h1></b></strong></br>
                                        </c:if>
                                    </div></td></tr>
                            <tr >
                                <td >
                                    <center>
                                        <form action="controller_khachhang" method="post">
                                            <input type="submit" class="btn btn-primary" name="btAction" value="Thêm mới"/>
                                            <input type="submit" class="btn btn-primary" name="btAction" value="Xóa tất cả"/>
                                        </form>
                                    </center>
                                </td>
                            </tr>
                        </table>
                    </center>
                    </form>
                    <div class="clear"> </div>
                    <!-- END CONTENT-->    
                </div>
                <div class="clear"> </div>
            </div>
        </div>
        <!-- FOOTER START -->
        <div class="container_16" id="footer">
            Website được quản lý bởi <a href="#">Phước - Cúc - Hằng</a>
        </div>
        <!-- FOOTER END -->
    </body>
</html>
